package com.xand.bt.terminal.ui.logger;

import java.util.Date;

public class LoggerTableController {

	private LoggerTableModel model;
	
	public LoggerTableController(LoggerTableModel model) {
		
		this.model = model;
		
	}
	
	public void addTrace(String trace) {
		LoggerTrace loggerTrace = new LoggerTrace();
		loggerTrace.setTimestamp(new Date());
		loggerTrace.setTrace(trace);
		
		this.model.getTraces().add(loggerTrace);
	}
	
	public void updateDisplay() {
		this.model.fireTableDataChanged();
	}
}
